package com.jming.jike.dto.front;

import com.jming.jike.common.ValidatorGroup.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author jinming.zhang
 * @version 0.0.1
 * @date 2022/05/26
 */
@Data
public class UserLoginDTO {

    @ApiModelProperty("手机号")
    @NotBlank(message = "手机号不能为空", groups = {Query.class, Update.class})
    @Pattern(regexp = "[0-9-()（）]{7,18}", message = "手机号格式不正确", groups = {Query.class, Update.class})
    private String phone;

    @ApiModelProperty("验证码")
    @NotBlank(message = "验证码不能为空", groups = {Update.class})
    private String code;

}
